
const conf=require("conf.js");
module.exports = {
  host: conf.API_HOST,
  request:function(url,data={}){
    var _this = this;
    return new Promise((resolve,reject)=>{
      wx.request({
        url: API_HOST+url, //仅为示例，并非真实的接口地址
        data: data,
        header: {
          'content-type': 'application/x-www-form-urlencoded' // 默认值
        },
        method: 'POST',
        success: function (res) {
          resolve(res);
        }
      })
    })
  }
}